import router from './index'
let whiteList = ['/login']
router.beforeEach((to, from, next) => {
    if (whiteList.includes(to.path)) {
        next()
    } else {
        let token = localStorage.getItem('X-Auth-Token')
        if (token) {
            next()
        } else {
            next('/login')
        }
    }
})

